<%-- 
    Document   : AccountStorage
    Created on : Jun 16, 2012, 7:41:58 PM
    Author     : praneeth
--%>
<%@page import="java.sql.*" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h3> account creation successfully created !</h3>
        <% 
        
    
       Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
       String uniq_id=request.getParameter("uniq_id");
       String firstname=request.getParameter("fname");
       String lastname=request.getParameter("lname");
       String uid=request.getParameter("uid");
       String pwd=request.getParameter("pwd");
       String cpwd=request.getParameter("cpwd");
       String fathername=request.getParameter("fathername");
       String hq=request.getParameter("HQ");
       String ha=request.getParameter("HA");
       String gender=request.getParameter("gender");
       String date=request.getParameter("date");
       String mb_no=request.getParameter("mbno");
       String e_id=request.getParameter("eid");
       String addr=request.getParameter("add");
       String areaa=request.getParameter("area");
       String pinn=request.getParameter("pin");
       String role1=request.getParameter("role");
       //String date=yy+"/"+mm+"/"+dd;
              System.out.println("date="+date);
              
String q1="insert into AccCreation values('"+uniq_id+"','"+firstname+"','"+lastname+"','"+uid+"','"+pwd+"','"+cpwd+"','"+fathername+"','"+hq+"','"+ha+"','"+gender+"','"+date+"','"+mb_no+"','"+e_id+"','"+addr+"','"+areaa+"','"+pinn+"','"+role1+"')";
       
       System.out.println(q1);
       String q2="insert into login values('"+uid+"','"+pwd+"','"+hq+"','"+ha+"')";
      System.out.println(q2);
       
       Connection connection=DriverManager.getConnection("jdbc:odbc:egasdsn");
       Statement stmt =connection.createStatement(); 
       
       int rs=stmt.executeUpdate(q1);
       int rs1=stmt.executeUpdate(q2);
       if(rs1==1)
           out.println("Go to Home And Login With your details"); 
       

%>
        
        
        
        
    </body>
</html>
